import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
import path from 'path';

export default function createSvgIcon(isBuild: boolean) {
	return createSvgIconsPlugin({
		// 要缓存的图标文件夹
		iconDirs: [path.resolve(process.cwd(), 'src/assets/icons/svg')],
		// symbolId的格式
		symbolId: 'icon-[dir]-[name]',
		svgoOptions: true,
	});
}
